Accusoft.ImagXpress13.Net
Select an Area or Region to Process

Prior to performing image processing on an image, you must specify whether the entire image, or a section of the image, should be processed. The Processor class provides two vehicles for specifying a section of the image to be processed:

If both an Area and a Region are enabled and defined, then the last one to be set will be used in processing.

If neither Area or Region are enabled and defined, then the entire image will be processed.

When Processor.EnableArea/EnableRegion is True, additional memory is required to store the original image to be merged with the area/region processed. If Area/Region processing is not needed, set Processor.EnableArea/EnableRegion to False to reduce memory usage.

Region

To process a region of an image:

  1. Define a part of the image to process, by specifying a graphics path, rectangle, ellipse, or polygon.
  2. Create a region, by calling the Processor.SetRegion method. Since only one region can be defined for each Processor, calling SetRegion deletes the previous region.
  3. Specify that the region should be used for processing, by setting the Processor EnableRegion property.
  4. When the region is no longer needed, call the Processor DeleteRegion method to delete the object and free up the associated memory.  
A Rubberband can be created to define a rectangular region on the display. The resulting Rectangle can then be passed as a parameter in Processor.SetRegion.
Deleting a region has no impact on the source (ImageX) image.

Area

To process an area of an image:

  1. Create an area by calling the Processor SetArea method, with a specified rectangular bounding area. Since only one area can be defined for each Processor, calling SetArea will delete the previous area.
  2. Specify that the area should be used for processing, by setting the Processor EnableArea property. When the area has been enabled, all image processing methods act on the area instead of the entire image. Calling SetArea will replace the current area with a newly defined area.  
A Rubberband can be created to define a rectangular area on the display. First select a rubberband area, then pass the resulting rectangle to Processor.SetArea.
There is no need to delete an area, as there are no resources to free.

The Processor methods: RemoveRedeye, RemoveDust, and RemoveScratches methods require that an area be set to specify the area to process. For all other methods and properties, setting an area is optional.

 

See Also

 

 


©2018. Accusoft Corporation. All Rights Reserved.

Send Feedback